#! /bin/bash

echo "Step-1: Starting cyber.jar at port 8092"
nohup java -jar cyber.jar --server.port=8092 \
  --spring.datasource.druid.master.url="jdbc:mysql://localhost:3306/situation_visual?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8" \
  --spring.datasource.druid.master.username=root \
  --spring.datasource.druid.master.password=root \
  2>&1 | /usr/local/sbin/cronolog ./ksh_%Y%m%d.log & 
echo "OK-1"

echo "Step-1: Starting SpringBoot-SSM-0.001-SNAPSHOT.jar at port 8888"
nohub java -jar  ./SpringBoot-SSM-0.0.1-SNAPSHOT.jar --server.port=8888 \
  --spring.profiles.active=pro \
  --spring.datasource.url="jdbc:mysql://localhost:3306/situation_visual?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false" \
  --spring.datasource.username=root \
  --spring.datasource.password=root \
  --xinda.callback.url=http://20.20.7.23:8009/ksh/backZongti \
  2>&1 | /usr/local/sbin/cronolog ./tp_%Y%m%d.log &
echo "OK-2"


echo "Step-3: Starting GeoServer at port 8088"
export GEOSERVER_HOME=/home/geoserver-2.19.2-bin/
sh /home/geoserver-2.19.2-bin/bin/startup.sh 1>/dev/null 2>&1 &
echo "OK-3"

